home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 37
/
Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso
/
Aminet
/
comm
/
mail
/
AEMail230.lha
/
aemail230
/
arexx
/
Modgrpnknm.aem
< prev
next >
Wrap
Text File
|
1998-09-25
|
2KB
|
90 lines
/* AEMail Modify Group Nickname */
OPTIONS RESULTS
/* TRACE ALL */
ADDTOAB = 1
IF (ADDTOAB = 1) THEN DO
OK = 0
DO UNTIL OK = 1
ADDRESS_BOOK LIST GROUP DESCRIPTION LF
grplist = RESULT
GETLISTITEM "'"grplist"' 'Select the Group Nickname to Modify'"
grpname = RESULT
IF (grpname = "") THEN EXIT
PARSE VAR grpname grpname dflt
dflt = STRIP(dflt, 'L')
ADDRESS_BOOK GET grpname TYPE
addrtype = RESULT
IF (addrtype = -1) THEN DO
OKAY2 '"Re-Enter Name|Cancel"' "Group Nickname Does Not Exist"
IF (RESULT = 1) THEN OK = 0
IF (RESULT = 0) THEN exit
END
IF (addrtype = 0) THEN DO
OKAY2 '"Re-enter Name|Cancel"' "Nickname is already used for an Individual"
IF (RESULT = 1) THEN OK = 0
IF (RESULT = 0) THEN exit
END
IF (addrtype = 1) THEN OK = 1
END
END
ADDRESS_BOOK GET grpname REALNAME
grpdesc = RESULT
ADDRESS_BOOK GET grpname 'SHO-FLAG'
IF (RESULT = 1) THEN sndho = "SHO"
ELSE sndho = ""
IF (ADDTOAB = 1) THEN DO
OK = 0
grpname2 = grpname
DO UNTIL OK = 1
GETSTRING '"Enter New Group Nickname"' "'"grpname2"'"
grpname2 = RESULT
IF (grpname2 = "") THEN EXIT
ADDRESS_BOOK GET grpname2 TYPE
addrtype2 = RESULT
IF (addrtype2 = -1) THEN OK = 1
ELSE DO
OKAY2 '"Re-enter Name|Cancel"' "Nickname is already used"
IF (RESULT = 1) THEN OK = 0
IF (RESULT = 0) THEN exit
END
END
END
ADDRESS_BOOK GET grpname FIRST USERID
IF (RC ~= 0) THEN DO
OKAY1 "last error is "AEMAIL.LASTERROR
EXIT
END
emailaddr=RESULT
DO UNTIL emailaddr = ""
IF (ADDTOAB = 1) THEN DO
IF (addrtype2 = -1) THEN DO
cmd = "ADDRESS_BOOK CREATE GROUP " grpname2 sndho "'"emailaddr"'" grpdesc
addrtype2 = 1
END
ELSE cmd = "ADDRESS_BOOK ADD TO GROUP " grpname2 "'"emailaddr"'"
cmd
END
ADDRESS_BOOK GET grpname NEXT USERID
IF (RC ~= 0) THEN DO
OKAY1 "last error is "AEMAIL.LASTERROR
EXIT
END
emailaddr=RESULT
END
ADDRESS_BOOK DELETE GROUP grpname
OKAY1 "Group Nickname modified"